package com.es.www.absfactory.factory;

import java.util.Objects;

/**
 * @Created by michangtao
 * @Date 2022/5/11 16:48
 * @Description
 */
public class FactoryProducer {

    public static AbstractFactory getFactory(String factoryType){
        if(Objects.equals(factoryType, "美的")){
            return new MideaFactory();
        }else if(Objects.equals(factoryType, "格力")){
            return new GreeFactory();
        }else {
            return null;
        }
    }
}
